package com.hxd.otc.common.enums;

/**
 * Created by lzy on 2018/12/25 0025.
 * description ${归属地枚举}
 */
public enum PhoneLocationEnum {

    NONE("0", "无"), YI_DONG("1", "移动"), LIAN_TONG("2", "联通"), DIAN_XIN("3", "电信");

    private final String mValue;
    private final String mDesc;

    PhoneLocationEnum(String value, String desc) {
        mValue = value;
        mDesc = desc;
    }

    public String getValue() {
        return mValue;
    }

    public String getDesc() {
        return mDesc;
    }

    public static PhoneLocationEnum getInstance(String value) {
        if (YI_DONG.mValue.equals(value)) {
            return YI_DONG;
        } else if (LIAN_TONG.mValue.equals(value)) {
            return LIAN_TONG;
        } else if (DIAN_XIN.mValue.equals(value)) {
            return DIAN_XIN;
        } else {
            return NONE;
        }
    }
}
